WPS Office.apk(点击下载) / ztt.java


package defpackage;

import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Build;
import android.os.Bundle;
import android.text.TextUtils;
import com.mopub.common.AdType;
import com.tencent.connect.common.AssistActivity;
import org.scribe.model.OAuthConstants;

/* renamed from: ztt  reason: default package */
public abstract class ztt {
    public static String BKc = null;
    public static String BKd = null;
    public static String BKe = null;
    public static boolean BKf = false;
    protected ztp BJZ;
    protected zts BKb;

    public ztt(ztp ztp) {
        this(null, ztp);
    }

    public ztt(zts zts, ztp ztp) {
        this.BKb = zts;
        this.BJZ = ztp;
    }

    protected static void a(Activity activity, int i, Intent intent, boolean z) {
        Intent intent2 = new Intent(activity.getApplicationContext(), AssistActivity.class);
        if (z) {
            intent2.putExtra("is_qq_mobile_share", true);
        }
        intent2.putExtra("openSDK_LOG.AssistActivity.ExtraIntent", intent);
        activity.startActivityForResult(intent2, i);
    }

    protected static boolean at(Intent intent) {
        if (intent != null) {
            return zux.n(zuu.a(), intent);
        }
        return false;
    }

    protected static Intent c(Activity activity, Intent intent) {
        Intent intent2 = new Intent(activity.getApplicationContext(), AssistActivity.class);
        intent2.putExtra("is_login", true);
        intent2.putExtra("openSDK_LOG.AssistActivity.ExtraIntent", intent);
        return intent2;
    }

    /* access modifiers changed from: protected */
    public final String a(String str) {
        Bundle gSF = gSF();
        StringBuilder sb = new StringBuilder();
        if (!TextUtils.isEmpty(str)) {
            gSF.putString("need_version", str);
        }
        sb.append("http://openmobile.qq.com/oauth2.0/m_jump_by_version?");
        sb.append(zuq.ad(gSF));
        return sb.toString();
    }

    /* access modifiers changed from: protected */
    public final Bundle b() {
        Bundle bundle = new Bundle();
        bundle.putString("appid", this.BJZ.a);
        if (this.BJZ.gSD()) {
            bundle.putString("keystr", this.BJZ.b);
            bundle.putString("keytype", "0x80");
        }
        String str = this.BJZ.c;
        if (str != null) {
            bundle.putString("hopenid", str);
        }
        bundle.putString("platform", "androidqz");
        SharedPreferences sharedPreferences = zuu.a().getSharedPreferences("pfStore", 0);
        if (BKf) {
            bundle.putString("pf", "desktop_m_qq-" + BKd + "-android" + "-" + BKc + "-" + BKe);
        } else {
            bundle.putString("pf", sharedPreferences.getString("pf", "openmobile_android"));
            bundle.putString("pf", "openmobile_android");
        }
        bundle.putString("sdkv", "3.2.0.lite");
        bundle.putString("sdkp", "a");
        return bundle;
    }

    /* access modifiers changed from: protected */
    public final void b(Activity activity, Intent intent, int i) {
        intent.putExtra("key_request_code", i);
        activity.startActivityForResult(c(activity, intent), i);
    }

    /* access modifiers changed from: protected */
    public final Bundle gSF() {
        Bundle bundle = new Bundle();
        bundle.putString("format", AdType.STATIC_NATIVE);
        bundle.putString("status_os", Build.VERSION.RELEASE);
        bundle.putString("status_machine", Build.MODEL);
        bundle.putString("status_version", Build.VERSION.SDK);
        bundle.putString("sdkv", "3.2.0.lite");
        bundle.putString("sdkp", "a");
        if (this.BJZ != null && this.BJZ.gSD()) {
            bundle.putString(OAuthConstants.ACCESS_TOKEN, this.BJZ.b);
            bundle.putString(OAuthConstants.CONSUMER_KEY, this.BJZ.a);
            bundle.putString("openid", this.BJZ.c);
            bundle.putString("appid_for_getting_config", this.BJZ.a);
        }
        SharedPreferences sharedPreferences = zuu.a().getSharedPreferences("pfStore", 0);
        if (BKf) {
            bundle.putString("pf", "desktop_m_qq-" + BKd + "-android" + "-" + BKc + "-" + BKe);
        } else {
            bundle.putString("pf", sharedPreferences.getString("pf", "openmobile_android"));
        }
        return bundle;
    }
}